<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GrPPI: grppi::farm_t&lt; Transformer &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GrPPI
   &#160;<span id="projectnumber">0.3.1</span>
   </div>
   <div id="projectbrief">Generic and Reusable Parallel Pattern Interface</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacegrppi.html">grppi</a></li><li class="navelem"><a class="el" href="classgrppi_1_1farm__t.html">farm_t</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classgrppi_1_1farm__t-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">grppi::farm_t&lt; Transformer &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Representation of farm pattern. Represents a farm of n replicas from a transformer.  
 <a href="classgrppi_1_1farm__t.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="farm__pattern_8h_source.html">farm_pattern.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a4ad17400d1d798b3ff157ea8e695db88"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1farm__t.html#a4ad17400d1d798b3ff157ea8e695db88">transformer_type</a> = Transformer</td></tr>
<tr class="separator:a4ad17400d1d798b3ff157ea8e695db88"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac4d1c4eb9c1777eedef322b8fd624fa2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1farm__t.html#ac4d1c4eb9c1777eedef322b8fd624fa2">farm_t</a> (int n, Transformer &amp;&amp;t) noexcept</td></tr>
<tr class="memdesc:ac4d1c4eb9c1777eedef322b8fd624fa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a farm with a cardinality and a transformer.  <a href="#ac4d1c4eb9c1777eedef322b8fd624fa2">More...</a><br /></td></tr>
<tr class="separator:ac4d1c4eb9c1777eedef322b8fd624fa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07679d9df7a3ab0b1fe90c2d0a8855dd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1farm__t.html#a07679d9df7a3ab0b1fe90c2d0a8855dd">cardinality</a> () const noexcept</td></tr>
<tr class="memdesc:a07679d9df7a3ab0b1fe90c2d0a8855dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Farm's cardinality or number of replicas.  <a href="#a07679d9df7a3ab0b1fe90c2d0a8855dd">More...</a><br /></td></tr>
<tr class="separator:a07679d9df7a3ab0b1fe90c2d0a8855dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae18b12445e1390bd7fb1cd8e29ec4d00"><td class="memItemLeft" align="right" valign="top">Transformer &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1farm__t.html#ae18b12445e1390bd7fb1cd8e29ec4d00">transformer</a> ()</td></tr>
<tr class="memdesc:ae18b12445e1390bd7fb1cd8e29ec4d00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the transformer function stored in the farm pattern.  <a href="#ae18b12445e1390bd7fb1cd8e29ec4d00">More...</a><br /></td></tr>
<tr class="separator:ae18b12445e1390bd7fb1cd8e29ec4d00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab44dd9a8436402a82157915c9ef5610c"><td class="memTemplParams" colspan="2">template&lt;typename I &gt; </td></tr>
<tr class="memitem:ab44dd9a8436402a82157915c9ef5610c"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classgrppi_1_1farm__t.html#ab44dd9a8436402a82157915c9ef5610c">operator()</a> (I &amp;&amp;item) const </td></tr>
<tr class="memdesc:ab44dd9a8436402a82157915c9ef5610c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invokes the trasnformer of the farm over a data item.  <a href="#ab44dd9a8436402a82157915c9ef5610c">More...</a><br /></td></tr>
<tr class="separator:ab44dd9a8436402a82157915c9ef5610c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Transformer&gt;<br />
class grppi::farm_t&lt; Transformer &gt;</h3>

<p>Representation of farm pattern. Represents a farm of n replicas from a transformer. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Transformer</td><td>Callable type for the farm transformer. </td></tr>
  </table>
  </dd>
</dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a4ad17400d1d798b3ff157ea8e695db88"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Transformer &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classgrppi_1_1farm__t.html">grppi::farm_t</a>&lt; Transformer &gt;::<a class="el" href="classgrppi_1_1farm__t.html#a4ad17400d1d798b3ff157ea8e695db88">transformer_type</a> =  Transformer</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac4d1c4eb9c1777eedef322b8fd624fa2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Transformer &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgrppi_1_1farm__t.html">grppi::farm_t</a>&lt; Transformer &gt;::<a class="el" href="classgrppi_1_1farm__t.html">farm_t</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Transformer &amp;&amp;&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs a farm with a cardinality and a transformer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>Number of replicas for the farm. </td></tr>
    <tr><td class="paramname">t</td><td>Transformer for the farm. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a07679d9df7a3ab0b1fe90c2d0a8855dd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Transformer &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classgrppi_1_1farm__t.html">grppi::farm_t</a>&lt; Transformer &gt;::cardinality </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Farm's cardinality or number of replicas. </p>
<dl class="section return"><dt>Returns</dt><dd>The farm's cardinality. </dd></dl>

</div>
</div>
<a class="anchor" id="ab44dd9a8436402a82157915c9ef5610c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Transformer &gt; </div>
<div class="memtemplate">
template&lt;typename I &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">auto <a class="el" href="classgrppi_1_1farm__t.html">grppi::farm_t</a>&lt; Transformer &gt;::operator() </td>
          <td>(</td>
          <td class="paramtype">I &amp;&amp;&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Invokes the trasnformer of the farm over a data item. </p>

</div>
</div>
<a class="anchor" id="ae18b12445e1390bd7fb1cd8e29ec4d00"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Transformer &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Transformer&amp; <a class="el" href="classgrppi_1_1farm__t.html">grppi::farm_t</a>&lt; Transformer &gt;::transformer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the transformer function stored in the farm pattern. </p>
<dl class="section return"><dt>Returns</dt><dd>The transformer function. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="farm__pattern_8h_source.html">farm_pattern.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
